package com.cxcs.cxcsojbackendjudgeservice.controller.inner;


import com.cxcs.cxcsojbackendjudgeservice.judge.service.JudgeService;
import com.cxcs.cxcsojbackendmodel.entity.QuestionSubmit;
import com.cxcs.cxcsojbackendserviceclient.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 【远程接口实现类】判题服务
 *      该服务仅供内部调用
 *
 * @Author: CxCS
 * @Version: 1.0
 * @Date: 2024-08
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
